package com.cdu.guoxinan.www.smartcom.mapper;

import com.cdu.guoxinan.www.smartcom.domian.dto.ProductQueryDTO;
import com.cdu.guoxinan.www.smartcom.domian.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ProductMapper {
    List<Product> findAll();
    List<Product> findByCategoryAndName(@Param("category") String category, @Param("name") String name);
    List<Product> queryPage(ProductQueryDTO productQueryDTO);
    Product findById(@Param("productId") Long productId);

    void insert(Product product);
    void update(Product product);
    void deleteById(@Param("productId") Long productId);
} 